//
//  EMMineLogoutView.m
//  EasyMoney
//
//  Created by 邓乐 on 2020/1/11.
//  Copyright © 2020 zh. All rights reserved.
//

#import "EMMineLogoutView.h"

@interface EMMineLogoutView ()

@property (nonatomic, strong) UIButton *btn;

@end

@implementation EMMineLogoutView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        self.btn = [UIButton buttonWithType:UIButtonTypeCustom];
        [self addSubview:self.btn];
        [self.btn setTitle:NSLocalizedString(@"退出登陆", nil) forState:UIControlStateNormal];
        [self.btn setTitleColor:ColorFromRGB(0xFF0000) forState:UIControlStateNormal];
        self.btn.titleLabel.font = FONT_PINGFANG_REGULAR_(14);
        [self.btn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self);
        }];
        [self.btn addTarget:self action:@selector(clickBtn:) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

- (void)clickBtn:(UIButton *)sender
{
    if (self.callback) {
        self.callback(0, self, nil);
    }
}

@end
